<div class="ui fixed inverted menu" th:fragment="menu">
    <a th:href="@{/}" class="header item">
        <img class="ui" th:src="@{/img/logo.png}" width="156" height="32" alt="" />
    </a>
    <a th:href="@{/contest/index}" href="#" class="active item">
        <i class="desktop icon"></i>在线考试
    </a>
    <a th:href="@{/problemset/list}" class="item">
        <i class="list layout icon"></i>题库中心
    </a>
    <a th:href="@{/discuss}" class="item">
        <i class="talk icon"></i>讨论区
    </a>
    <a th:onclick="'app.showLogin()'"  class="right item" th:if="${current_account == null}">
        <i class="sign in icon"></i>登录
    </a>
    <div class="ui simple dropdown right item" th:if="${current_account != null}">
        <img class="ui avatar image" th:src="@{'/upload/images/'+${current_account.avatarImgUrl}}" />
        <span th:text="${current_account.name}"></span> <i class="dropdown icon"></i>
        <div class="menu">
            <a class="item" th:href="@{/account/profile}">
                <i class="user icon"></i>我的主页
            </a>
            <a class="item" id="logout">
                <i class="sign out icon"></i>退出
            </a>
        </div>
    </div>
</div>

<div class="ui fixed inverted menu" th:fragment="menu-user">
    <a th:href="@{/}" class="header item">
        <img class="ui" th:src="@{/img/logo.png}" width="156" height="32" alt="" />
    </a>
    <a th:href="@{/contest/index}" href="#" class="item">
        <i class="desktop icon"></i>在线考试
    </a>
    <a th:href="@{/problemset/list}" class="item">
        <i class="list layout icon"></i>题库中心
    </a>
    <a th:href="@{/discuss}" class="item">
        <i class="talk icon"></i>讨论区
    </a>
    <a class="right item" id="logout">
        <i class="sign out icon"></i>退出
    </a>
</div>